<?php

use common\grid\EnumColumn;
use common\models\User;
use kartik\grid\GridView;
use yii\bootstrap\ActiveForm;

?>
<style>
html {overflow-y:hidden; }
</style>
<div class="user-index">

    <?php // echo $this->render('_search', ['model' => $searchModel]); ?>

    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'options' => [
            'class' => 'grid-view table-responsive'
        ],
        'responsive'=>true,
        'hover'=>true,
        'pjax'=>true,
        'columns' => [
             ['class' => 'yii\grid\CheckboxColumn'],
            ['attribute' => 'id', 'footerOptions' => ['class'=>'hide']],
//            'id',
            'username',
            'email:email',
            [
                'class' => EnumColumn::className(),
                'attribute' => 'status',
                'enum' => User::statuses(),
                'filter' => User::statuses()
            ],
            'created_time:datetime',
//            'logged_at:datetime',
            // 'updated_at',

           
        ],
    ]); ?>

</div>

<?php
$js = <<< JS
        $("input[type=checkbox]").change(function(){
            var value = $(this).val();
            window.parent.document.getElementById('cust-btn-ok').setAttribute('attrs',value);
        });
JS;

// register javascript
$this->registerJs($js);
?>
